package com.ht.medicaltreatment.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.ht.medicaltreatment.R
import com.ht.medicaltreatment.base.BaseUrl
import com.ht.medicaltreatment.bean.ConsumableTypeProgress
import com.ht.medicaltreatment.utils.loadImage

class ConsumableListAdapter: BaseQuickAdapter<ConsumableTypeProgress, BaseViewHolder>(R.layout.item_consumable_list_layout) {
    override fun convert(holder: BaseViewHolder, item: ConsumableTypeProgress) {
        holder.setText(R.id.tvName,item.desc)
        holder.setText(R.id.tvProgress,item.useProgress)
        holder.loadImage(R.id.imgType,BaseUrl.baseUrl()+item.url)
    }
}
